<?php


namespace app\Exception;




use think\exception\ValidateException;


class UserException extends ValidateException
{
    protected $code;

    public function __construct(int $code ,$error)
    {
        parent::__construct($error);
        $this->code = $code;
    }

    function getErrorCode():int {
        return $this->code;
    }
}